/*
 * @Author: 贺楠 1071780426@qq.com
 * @Date: 2024-09-06 12:55:22
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-10-22 09:09:53
 * @FilePath: \monitoring_system\src\api\request.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2022-08-17 17:24:44
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-09-10 14:15:00
 * @FilePath: \backstage\src\api\request.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import {
    req,
    reqNull,
    up,
    // reqNulls,
    // reqNull1,
    // reqPdf
} from './index';
// let url = 'http://1.14.103.201:8300/IOTManagement/' //高信
// let url = 'http://192.168.0.02:8080/IOTManagement/' //孙猛本地
// let url = 'http://192.168.0.8:8300/IOTManagement/' //李康本地
// let url = 'http://192.168.0.20:8300/IOTManagement/' //嫣然/本地
// let url = 'http://192.168.0.44:8080/IOTManagement/' //韩磊/本地
let url = 'http://110.185.107.22:8388/newiotmachine/' //x薛/本地

// let url = 'https://xayj.limsapp.cn:8010/qualityManagementPlatform/' //正式
// 文件前缀
// var fileAnnexes = 'http://xayj.limsapp.cn:8301//fileAnnexes/';
// 试验机删除日志
// var fileUrl="http://iot.limsapp.cn/scyj/api/scyjiot/syjdeletelog/files"
// 上传附
export const upload = (res) => {
    return up("post", url + "App/upload/uploadFile", res)
}
//  登录
export const login = (res) => {
    return reqNull("post", url + "Base/User/loginWeb", res)
}
// 免登陆
export const loginfree = (res) => {
    return reqNull("post", url + "Base/login/loginfree", res)
}
// 免登录 
export const loginHttps = (res) => {
    return reqNull("post", url + "Base/User/loginHttps", res)
}

//组织机构-- 获取列表数据(左侧树)
export const getUserCompanyTreeList = (res) => {
    return reqNull("post", url + "Base/Company/getUserCompanyTreeList", res)
}





// 获取数据库所有表名
export const getSysTable = (res) => {
    return reqNull("post", url + "roadApi/getSysTable", res)
}
// 标段划分--列表页
export const getCheckProjectFirstList = (res) => {
    return reqNull("post", url + "Web/CheckItem/getCheckProjectFirstList", res)
}
// 管理系统

//组织机构-- 获取列表数据(只查施工单位)
export const getBaseSgCompanyList = (res) => {
    return reqNull("post", url + "/Base/Company/getBaseSgCompanyList", res)
}
//组织机构-- 获取列表数据
export const getBaseCompanyList = (res) => {
    return reqNull("post", url + "Base/Company/getBaseCompanyList", res)
}
//组织机构--新增
export const addBaseCompany = (res) => {
    return reqNull("post", url + "Base/Company/addBaseCompany", res)
}
//组织机构--编辑
export const getBaseCompanyByFid = (res) => {
    return reqNull("post", url + "Base/Company/getBaseCompanyByFid", res)
}
//组织机构--删除
export const delBaseCompany = (res) => {
    return reqNull("post", url + "Base/Company/delBaseCompany", res)
}
// 省市区
export const Area = (res) => {
    return reqNull("post", url + "Base/Area/getBaseAreaList", res)
}


// 角色管理-列表页（分页）
export const getBaseRoleList = (res) => {
    return req("post", url + "Base/Role/getBaseRoleList", res)
}
// 角色管理- 详情
export const getBaseRoleDetail = (res) => {
    return req("post", url + "Base/Role/getBaseRoleByFid", res)
}
// 角色管理- 新增
export const getBaseRoleAdd = (res) => {
    return req("post", url + "Base/Role/addBaseRole", res)
}
// 角色管理- 删除
export const getBaseRoleDelete = (res) => {
    return req("post", url + "Base/Role/delBaseRole", res)
}
// 角色管理-角色与用户绑定接口
export const addBaseRoleUser = (res) => {
    return req("post", url + "Base/Role/addBaseRoleUser", res)
}
// 角色管理-查询当前角色模块按钮权限
export const getBaseRoleModuleList = (res) => {
    return req("post", url + "Base/Role/getBaseRoleModuleList", res)
}

// 角色管理-当前角色模块按钮权限新增接口

export const addBaseRoleModule = (res) => {
    return req("post", url + "Base/Role/addBaseRoleModule", res)
}

// 部门管理-查询部门列表以及下属人员
export const getRoleUserList = (res) => {
    return req("post", url + "Base/Role/getRoleUserList", res)
}
// 部门管理-查询部门列表以及下属人员
export const getBaseDepartmentUser = (res) => {
    return req("post", url + "Base/Department/getBaseDepartmentUserByCompanyid", res)
}



// 部门管理--获取列表数据
export const getBaseDepartmentList = (res) => {
    return reqNull("post", url + "Base/Department/getBaseDepartmentList", res)
}
//部门管理--新增
export const addBaseDepartment = (res) => {
    return reqNull("post", url + "Base/Department/addBaseDepartment", res)
}
//部门管理--编辑
export const getBaseDepartmentByFid = (res) => {
    return reqNull("post", url + "Base/Department/getBaseDepartmentByFid", res)
}
//部门管理--删除
export const delBaseDepartment = (res) => {
    return reqNull("post", url + "Base/Department/delBaseDepartment", res)
}


//岗位管理-- 列表数据
export const getBasePostList = (res) => {
    return reqNull("post", url + "Base/Post/getBasePostList", res)
}
//岗位管理--新增
export const addBasePost = (res) => {
    return reqNull("post", url + "Base/Post/addBasePost", res)
}
//岗位管理--编辑
export const getBasePostByFid = (res) => {
    return reqNull("post", url + "Base/Post/getBasePostByFid", res)
}
//岗位管理--删除
export const delBasePost = (res) => {
    return reqNull("post", url + "Base/Post/delBasePost", res)
}



// 用户管理--列表数据
export const getBaseUserPageList = (res) => {
    return reqNull("post", url + "Base/User/getBaseUserPageList", res)
}
// 用户管理--新增
export const addBaseUser = (res) => {
    return reqNull("post", url + "Base/User/addBaseUser", res)
}
// 用户管理--详情
export const getBaseUserByFid = (res) => {
    return reqNull("post", url + "Base/User/getBaseUserByFid", res)
}
// 用户管理--删除
export const delBaseUser = (res) => {
    return reqNull("post", url + "Base/User/delBaseUser", res)
}
// 用户管理--数据查询
export const getBaseUserList = (res) => {
    return reqNull("post", url + "Base/User/getBaseUserList", res)
}
// 用户管理--判断用户名是否重复
export const getExistAccount = (res) => {
    return reqNull("post", url + "Base/User/getExistAccount", res)
}


// 系统管理模块管理-列表页
export const getBaseModuleList = (res) => {
    return reqNull("post", url + "Base/Module/getBaseModuleList", res)
}
// 模块管理-详情接口
export const getBaseModuleDetail = (res) => {
    return reqNull("post", url + "Base/Module/getBaseModuleByFid", res)
}
// 模块管理-删除接口
export const getBaseModuleDelete = (res) => {
    return reqNull("post", url + "Base/Module/delBaseModule", res)
}
// 模块新增
export const getBaseModuleAdd = (res) => {
    return reqNull("post", url + "Base/Module/addBaseModule", res)
}


// 数据字典--左侧树状图接口
export const getBaseDataitemList = (res) => {
    return reqNull("post", url + "Base/Dataitem/getBaseDataitemList", res)
}
// 数据字典-右侧列表页（根据编码查询）
export const getBaseDataitemDetailByItemCode = (res) => {
    return reqNull("post", url + "Base/Dataitem/getBaseDataitemDetailByItemCode", res)
}
// 数据字典-列表--新增
export const addBaseDataitemDetail = (res) => {
    return reqNull("post", url + "Base/Dataitem/addBaseDataitemDetail", res)
}
// 数据字典-列表--详情
export const getBaseDataitemDetailByFid = (res) => {
    return reqNull("post", url + "Base/Dataitem/getBaseDataitemDetailByFid", res)
}
// 数据字典-列表--删除
export const delBaseDataitemDetail = (res) => {
    return reqNull("post", url + "Base/Dataitem/delBaseDataitemDetail", res)
}

// 数据字典-左侧树状图--新增
export const addBaseDataitem = (res) => {
    return reqNull("post", url + "Base/Dataitem/addBaseDataitem", res)
}
// 数据字典-左侧树状图--详情
export const getBaseDataitemByFid = (res) => {
    return reqNull("post", url + "Base/Dataitem/getBaseDataitemByFid", res)
}
// 数据字典-左侧树状图--删除
export const delBaseDataitem = (res) => {
    return reqNull("post", url + "Base/Dataitem/delBaseDataitem", res)
}



// 项目树
export const getUserCompanyTreeListXm = (res) => {
    return reqNull("post", url + "Base/Company/getUserCompanyTreeListXm", res)
}



// 首页-预警统计接口
export const getConcreteWarningStatistics = (res) => {
    return reqNull("post", url + "homePage/getConcreteWarningStatistics", res)
}
// 首页-设备数量统计接口
export const getEquipStatistics = (res) => {
    return reqNull("post", url + "homePage/getEquipStatistics", res)
}
// 首页-质量管控统计接口
export const getQualityStatistics = (res) => {
    return reqNull("post", url + "homePage/getQualityStatistics", res)
}
// 首页


